package com.szty.libarytest.other

import android.graphics.Outline
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.View
import android.view.ViewOutlineProvider
import com.sjh.baseutils.dp
import com.szty.libarytest.R
import kotlinx.android.synthetic.main.activity_blur_view.*

class BlurViewActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_blur_view)
        rbl.outlineProvider = object : ViewOutlineProvider(){
            override fun getOutline(view: View, outline: Outline) {
                outline.setRoundRect(0,0,view.width,view.height,6.dp)
            }
        }
        rbl.clipToOutline = true
    }
}